package com.jianjunhuang.demo.wechatdemo;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

public class HomepageActivity extends AppCompatActivity {

    private ListView homepageLv;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.homepage_activity);

        homepageLv = findViewById(R.id.homepage_wechat_lv);

        List<WeChatBean> mList = new ArrayList<>();

        for (int i = 0; i < 20; i++) {
            WeChatBean bean = new WeChatBean();
            bean.setAvatar(R.mipmap.ic_launcher);
            bean.setNickName("Einal");
            bean.setContent("hahahahahahahahaha");
            bean.setTime("16:17");
            mList.add(bean);
        }

        homepageLv.setAdapter(new HomepageListViewAdapter(this, mList));

    }
}
